package com.xingole.entities;

import java.io.Serializable;

public class Account implements Serializable {
    /* The primary key for database */
    private Integer id;

    /* In fact, owner may be another java class*/
    private String owner;

    /* The balance for this account */
    private Double balance;

    /*The deadline for this account */
    private Integer tenure;

    /*The password for this account*/
    private String password;

    /*The bounded device for this account used*/
    private String boundedDevice;

    // constructors
    public Account() {
        super();
    }

    public Account(String owner, Double balance, Integer tenure,
                   String password, String boundedDevice) {
        this();
        this.owner = owner;
        this.balance = balance;
        this.tenure = tenure;
        this.password = password;
        this.boundedDevice = boundedDevice;
    }

    // access methods
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getOwner() {
        return owner;
    }

    public void setOwner(String owner) {
        this.owner = owner;
    }

    public Double getBalance() {
        return balance;
    }

    public void setBalance(Double balance) {
        this.balance = balance;
    }

    public Integer getTenure() {
        return tenure;
    }

    public void setTenure(Integer tenure) {
        this.tenure = tenure;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getBoundedDevice() {
        return boundedDevice;
    }

    public void setBoundedDevice(String boundedDevice) {
        this.boundedDevice = boundedDevice;
    }

    @Override
    public String toString() {
        return "Account{" +
                "id=" + id +
                ", owner='" + owner + '\'' +
                ", balance=" + balance +
                ", tenure=" + tenure +
                ", password='" + password + '\'' +
                ", boundedDevice='" + boundedDevice + '\'' +
                '}';
    }
}
